package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sc.nft.enums.MarketTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("我的订单列表")
public class NewSecondCollectionGoodsBuyOrderListVO {

    @ApiModelProperty("缩略图")
    private String creationContent;

    @ApiModelProperty("1级标题")
    private String firstTitle;

    private Long collectionId;

    private Integer numbering;

    private Integer collectionSumCount;

    @ApiModelProperty("编号")
    private String serialNumber;

    @ApiModelProperty("订单号")
    private String orderId;

    @ApiModelProperty("订单编号")
    private String orderNo;

    @ApiModelProperty("订单状态")
    private Integer status;

    @ApiModelProperty("订单创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("购买价格")
    private String buyPrice;

    @ApiModelProperty("订单类型")
    private MarketTypeEnum marketType;

    public void setBuyPrice(BigDecimal buyPrice) {
        this.buyPrice = buyPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

}
